<?php


/*
* Copyright (c) 2008-2016 vip.com, All Rights Reserved.
*
* Powered by com.vip.osp.osp-idlc-2.5.11.
*
*/

namespace com\vip\vis\vreturn\api\service\model;

class ReturnDiffInterfaceCreateDetailParamModel {
	
	static $_TSPEC;
	public $poNo = null;
	public $itemCode = null;
	public $boxId = null;
	public $payQuantity = null;
	public $vendorFeedback = null;
	public $secondVendorFeedback = null;
	public $vendorNote = null;
	public $isComplete = null;
	public $isReturn = null;
	public $skuImg = null;
	public $antiTheftCode = null;
	public $orderSn = null;
	public $videoUrl = null;
	public $noUniqueCodeReason = null;
	public $transportBoxId = null;
	public $transDetailId = null;
	public $opType = null;
	public $originOrderSn = null;
	
	public function __construct($vals=null){
		
		if (!isset(self::$_TSPEC)){
			
			self::$_TSPEC = array(
			1 => array(
			'var' => 'poNo'
			),
			2 => array(
			'var' => 'itemCode'
			),
			3 => array(
			'var' => 'boxId'
			),
			4 => array(
			'var' => 'payQuantity'
			),
			5 => array(
			'var' => 'vendorFeedback'
			),
			6 => array(
			'var' => 'secondVendorFeedback'
			),
			7 => array(
			'var' => 'vendorNote'
			),
			8 => array(
			'var' => 'isComplete'
			),
			9 => array(
			'var' => 'isReturn'
			),
			10 => array(
			'var' => 'skuImg'
			),
			11 => array(
			'var' => 'antiTheftCode'
			),
			12 => array(
			'var' => 'orderSn'
			),
			13 => array(
			'var' => 'videoUrl'
			),
			14 => array(
			'var' => 'noUniqueCodeReason'
			),
			15 => array(
			'var' => 'transportBoxId'
			),
			16 => array(
			'var' => 'transDetailId'
			),
			17 => array(
			'var' => 'opType'
			),
			18 => array(
			'var' => 'originOrderSn'
			),
			
			);
			
		}
		
		if (is_array($vals)){
			
			
			if (isset($vals['poNo'])){
				
				$this->poNo = $vals['poNo'];
			}
			
			
			if (isset($vals['itemCode'])){
				
				$this->itemCode = $vals['itemCode'];
			}
			
			
			if (isset($vals['boxId'])){
				
				$this->boxId = $vals['boxId'];
			}
			
			
			if (isset($vals['payQuantity'])){
				
				$this->payQuantity = $vals['payQuantity'];
			}
			
			
			if (isset($vals['vendorFeedback'])){
				
				$this->vendorFeedback = $vals['vendorFeedback'];
			}
			
			
			if (isset($vals['secondVendorFeedback'])){
				
				$this->secondVendorFeedback = $vals['secondVendorFeedback'];
			}
			
			
			if (isset($vals['vendorNote'])){
				
				$this->vendorNote = $vals['vendorNote'];
			}
			
			
			if (isset($vals['isComplete'])){
				
				$this->isComplete = $vals['isComplete'];
			}
			
			
			if (isset($vals['isReturn'])){
				
				$this->isReturn = $vals['isReturn'];
			}
			
			
			if (isset($vals['skuImg'])){
				
				$this->skuImg = $vals['skuImg'];
			}
			
			
			if (isset($vals['antiTheftCode'])){
				
				$this->antiTheftCode = $vals['antiTheftCode'];
			}
			
			
			if (isset($vals['orderSn'])){
				
				$this->orderSn = $vals['orderSn'];
			}
			
			
			if (isset($vals['videoUrl'])){
				
				$this->videoUrl = $vals['videoUrl'];
			}
			
			
			if (isset($vals['noUniqueCodeReason'])){
				
				$this->noUniqueCodeReason = $vals['noUniqueCodeReason'];
			}
			
			
			if (isset($vals['transportBoxId'])){
				
				$this->transportBoxId = $vals['transportBoxId'];
			}
			
			
			if (isset($vals['transDetailId'])){
				
				$this->transDetailId = $vals['transDetailId'];
			}
			
			
			if (isset($vals['opType'])){
				
				$this->opType = $vals['opType'];
			}
			
			
			if (isset($vals['originOrderSn'])){
				
				$this->originOrderSn = $vals['originOrderSn'];
			}
			
			
		}
		
	}
	
	
	public function getName(){
		
		return 'ReturnDiffInterfaceCreateDetailParamModel';
	}
	
	public function read($input){
		
		$input->readStructBegin();
		while(true){
			
			$schemeField = $input->readFieldBegin();
			if ($schemeField == null) break;
			$needSkip = true;
			
			
			if ("poNo" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->poNo);
				
			}
			
			
			
			
			if ("itemCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->itemCode);
				
			}
			
			
			
			
			if ("boxId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->boxId);
				
			}
			
			
			
			
			if ("payQuantity" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->payQuantity); 
				
			}
			
			
			
			
			if ("vendorFeedback" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vendorFeedback);
				
			}
			
			
			
			
			if ("secondVendorFeedback" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->secondVendorFeedback);
				
			}
			
			
			
			
			if ("vendorNote" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->vendorNote);
				
			}
			
			
			
			
			if ("isComplete" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->isComplete); 
				
			}
			
			
			
			
			if ("isReturn" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->isReturn); 
				
			}
			
			
			
			
			if ("skuImg" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->skuImg);
				
			}
			
			
			
			
			if ("antiTheftCode" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->antiTheftCode);
				
			}
			
			
			
			
			if ("orderSn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->orderSn);
				
			}
			
			
			
			
			if ("videoUrl" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->videoUrl);
				
			}
			
			
			
			
			if ("noUniqueCodeReason" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->noUniqueCodeReason);
				
			}
			
			
			
			
			if ("transportBoxId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->transportBoxId);
				
			}
			
			
			
			
			if ("transDetailId" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->transDetailId);
				
			}
			
			
			
			
			if ("opType" == $schemeField){
				
				$needSkip = false;
				$input->readI32($this->opType); 
				
			}
			
			
			
			
			if ("originOrderSn" == $schemeField){
				
				$needSkip = false;
				$input->readString($this->originOrderSn);
				
			}
			
			
			
			if($needSkip){
				
				\Osp\Protocol\ProtocolUtil::skip($input);
			}
			
			$input->readFieldEnd();
		}
		
		$input->readStructEnd();
		
		
		
	}
	
	public function write($output){
		
		$xfer = 0;
		$xfer += $output->writeStructBegin();
		
		$xfer += $output->writeFieldBegin('poNo');
		$xfer += $output->writeString($this->poNo);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('itemCode');
		$xfer += $output->writeString($this->itemCode);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('boxId');
		$xfer += $output->writeString($this->boxId);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('payQuantity');
		$xfer += $output->writeI32($this->payQuantity);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('vendorFeedback');
		$xfer += $output->writeString($this->vendorFeedback);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->secondVendorFeedback !== null) {
			
			$xfer += $output->writeFieldBegin('secondVendorFeedback');
			$xfer += $output->writeString($this->secondVendorFeedback);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldBegin('vendorNote');
		$xfer += $output->writeString($this->vendorNote);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('isComplete');
		$xfer += $output->writeI32($this->isComplete);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('isReturn');
		$xfer += $output->writeI32($this->isReturn);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('skuImg');
		$xfer += $output->writeString($this->skuImg);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->antiTheftCode !== null) {
			
			$xfer += $output->writeFieldBegin('antiTheftCode');
			$xfer += $output->writeString($this->antiTheftCode);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->orderSn !== null) {
			
			$xfer += $output->writeFieldBegin('orderSn');
			$xfer += $output->writeString($this->orderSn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->videoUrl !== null) {
			
			$xfer += $output->writeFieldBegin('videoUrl');
			$xfer += $output->writeString($this->videoUrl);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->noUniqueCodeReason !== null) {
			
			$xfer += $output->writeFieldBegin('noUniqueCodeReason');
			$xfer += $output->writeString($this->noUniqueCodeReason);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		if($this->transportBoxId !== null) {
			
			$xfer += $output->writeFieldBegin('transportBoxId');
			$xfer += $output->writeString($this->transportBoxId);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldBegin('transDetailId');
		$xfer += $output->writeString($this->transDetailId);
		
		$xfer += $output->writeFieldEnd();
		
		$xfer += $output->writeFieldBegin('opType');
		$xfer += $output->writeI32($this->opType);
		
		$xfer += $output->writeFieldEnd();
		
		if($this->originOrderSn !== null) {
			
			$xfer += $output->writeFieldBegin('originOrderSn');
			$xfer += $output->writeString($this->originOrderSn);
			
			$xfer += $output->writeFieldEnd();
		}
		
		
		$xfer += $output->writeFieldStop();
		$xfer += $output->writeStructEnd();
		return $xfer;
	}
	
}

?>